package com.zukxu.items.project.pinyin4j;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Description: PinYin4JController
 *
 * @author zukxu
 * @date 2020/10/30 0030 09:34
 */
@RestController
@RequestMapping("/pinyin")
public class PinYin4JController {

	@GetMapping
	public Map<String, StringBuffer> getPinYin(String code) {
		PinYinTool tool = new PinYinTool();
		Map<String, StringBuffer> map = tool.string2Pinyin(code);
		return map;
	}
}
